package pe.edu.pucp.cpnc.mm.bean;

import java.io.Serializable;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

@XmlRootElement
@XmlType(propOrder ={"id","type","path","height","sprite"})
public class Tile implements Serializable {
	private int id;
	private int path; //Land(0) or Water(1) 
	private int height; //Makes cliffs possible.
	private String type; //Grass, stone, sand.
	private char sprite;//Character representing the sprite;
	
	public Tile(){
		
	}

	
	public Tile(int id, int path, String type, char sprite){
		this.id = id;
		this.path = path;
		height= 0;
		this.type = type;
		this.sprite = sprite;
	}
	
	public Tile(Tile tile){
		this.id = tile.getId();
		this.path = tile.getPath();
		this.height = tile.getHeight();
		this.type = tile.getType();
		this.sprite = tile.getSprite();
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getPath() {
		return path;
	}

	public void setPath(int path) {
		this.path = path;
	}

	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public char getSprite() {
		return sprite;
	}

	public void setSprite(char sprite) {
		this.sprite = sprite;
	}
        
        @Override
        public String toString(){
            return type;
        }
		
}
